# Measure speed of slot car

If I have some cars going around a track and I want to measure their speed if I put two IR sensors up at a fixed distances can I accurately calculate the speed the cars are moving using an Arduino?

• Not unless you can figure out which car broke the beam. Dec 23, 2014 at 1:54
• Dec 23, 2014 at 2:07

I don't see why not, fancy ones only go about 15MPH. So you just need two IR sensors far enough apart, maybe over the track so you can measure two cars at once. Then run a timer on the audrino, and record when the first beam breaks, then the second. Subtract and use difference to calculate the speed.

You could embed one side of the IR detector in the track and put the other above, or maybe put one to the side and the top at an angle. Just something to let the other car slide by.

• Hall effect sensors might work too Dec 23, 2014 at 1:59

In Some Hardware Guy's comment on his own answer is a good one - put a high strength rare-earth magnet on the side of the slot car, and then place hall-effect sensors on each side of the track (left and right side) in two different areas with known locations - these sensors will detect a pulse as the cars fly past, and this can be read by an Arduino easily enough.

You might want a way of temporarily attaching the magnets by the way, like a little velcro patch. then you can swap sides of the tracks etc, and have two cars going at once without magnetizing each other (if you had magnets on both sides for example, they would stick/push each other away and do funny things). This allows the inner and outer track (if it's a 2-lane course) to be separately triggered and recorded.

You can do all of this very cheaply too, so have fun! sounds like a cool project.

• You may be able to put the hall sensor under the track and sense the motor in the car as it goes by. Dec 23, 2014 at 3:19
• depends if the motor emits enough magnetic goodness, but they are pretty crazy little motors on those slot cars, so yeah, could work! Dec 23, 2014 at 13:57