Is it really possible to accurately measure to .001?

I have built a laser/photoresistor start/finish line with the hopes of accurately measuring to .001 or better at .0001. My system works except that I need to be confident in the measurement. In racing, .001 can be several inches or even feet. To test my system I have a cheap stepper motor breaking the laser beam. Repeated trials show variation in time (+-.02 ugh). I don't know if it is because the stepper motor is unreliable or because measuring a photoresistor is inconsistent or what the problem might be. I've changed parameters on the sensors multiple times but haven't made any real progress. So I guess my question is, Am I asking my Arduino Nano to do too much? I haven't found anyone actually verify the accuracy of their race systems. And what human can argue with a computer?

Thanks for taking a look at this post!

with the hopes of accurately measuring to .001

What exactly are you measuring? .001 what? seconds? km?
And exactly HOW are you measuring it?

My system works

What system? Post your code (in code tags).

Pete

A photo resistor (LDR) is slooooow. Photo diodes/transistors would be faster.
Why a laser. A laser/photo diode setup is hard to align.

I have made beam break sensors with a normal narrow beam IR LED (not lasers) and a 3-pin 38kHz IR receiver.
Modulated (38kHz) infrared is much less sensitive to ambient light,
LEDs/IR receivers don't need to be aimed that precise,
and they still have a 'beam' less than 5mm 'thick' without any optics/tubes.
<= 0.001 sec reaction time is possible with 38kHz modulated IR.
Leo..

Thanks for your replies. Firstly I’m measuring seconds between when the start line is crossed to when the finish line is crossed. My program is measuring in microseconds in order to get up to .0001 seconds.

Wawa thanks for your suggestion. I’m currently using a common photoresistor out of an Arduino sensor kit ordered online. The lasers are some cheap red lasers also ordered online. I’m using lasers and photoresistors because they made more sense to me and I had them available. I think I have some IR stuff but thought that was for close range. I need my line to go maybe 20-30 feet. I guess I’ll look into IR. Thanks.

What's the distance between start and finish and what is a typical elapsed time over this distance?

Pete

Long term project is a wireless system with the finish line at most 1000 feet from the start. It’s a race timer for Soap Box Derby (gravity race). Cars go between 15-50 feet per second depending on the hill. I’ve already put the equipment together but I’m not sure if I can trust the consistency of results. To simplify the system in order to check the accuracy and precision I have a single laser with a stepper motor “tripping” the laser beam. Testing has shown too much variation to be useful which is why I’m reaching out for help. To clarify one Arduino runs the laser and photoresistor, another Arduino Control’s the stepper motor. I don’t know if it’s the Arduino, or the resistor or the stepper motor or a combination of things that are causing the problem. The code is simple and similar to other race timer codes I’ve seen. I think it’s a hardware problem not a software.

A stepper motor would even be slower than an LDR.

Just use a narrow beam (for >=30feet) IR LED and 3-pin 38kHz beambreak receiver.
Note that very few 3-pin IR sensors are made for beam break. Most are made for IR remotes.

The sensor I made had no problems detecting a ~4mm knitting needle flicking as fast as I could through the beam. I think that 1/2000sec shoudn't be a big problem with the right setup.
Exact time and synchronising time between transmitter/receiver could be a bigger challenge.
Leo..

Leo, I think you misunderstood what I was doing with the stepper motor. I am using the stepper motor to trip the laser beam that shines on the LDR. In other words, the stepper motor is acting as the racer. My thought was that a stepper motor should move at a consistent speed over multiple trials and thus be able to prove my timer was reliable in regards to giving me the same time over and over to a measurement of .001 seconds.

The struggle here is that .001 seconds is such a small measurement. I understand that a computer can keep track of time to microseconds but getting the computer to start and stop the timer consistently via sensors/switches seems like a difficult task. My timer will happily produce a race time. The problem is that I need to know if that time is reliable from trial to trial. Other people online make timers just like this but I'm not confident that they would know if their timers were accurate/precise or not.

Again, I really appreciate your input. I'm sorry if I'm not explaining things clearly.

getting the computer to start and stop the timer consistently via sensors/switches seems like a difficult task.

To the Arduino, one millisecond is eternity (16,000 ticks of the clock).
Look elsewhere for timing problems.

evaneazer:
Leo, I think you misunderstood what I was doing with the stepper motor.

No, I didn't.
Did you calculate how slow (for a sensor) a vane attached to a stepper moves through the beam.
Leo..

Not sure what you mean by vane. I'm hoping you mean the thing I have attached to the stepper motor that blocks the laser. It does slowly block the laser. I'd love for it to be faster but speeding it up via the gears that I have was making things worse. I was hoping that whatever speed is was blocking the laser, it was doing it consistently and therefore not a variable. In real application, the racer will block the sensor faster. That would seem like a good thing. I'm pulling out my IR emitter and sensor now. I'll see if I can get it going.

evaneazer:
Not sure what you mean by vane. I'm hoping you mean the thing I have attached to the stepper motor that blocks the laser.

It does slowly block the laser. I'd love for it to be faster but speeding it up via the gears that I have was making things worse.

Yes, you need someting attached to the axle of the motor to block the beam.

You could try counting the blades of a fast spinning PC fan, by shining the laser through it.
I think the biggest problem you have now is the slow LDR.

Post your code (read forum rules first) if you want help with that.
You might have to use interrupts instead of polling, for a faster reaction time.
Leo..

There's precision, and then there's accuracy...

Over a 30 second run, say, your Arduino's internal timer could be inaccurate by 0.003 seconds, if its crystal is off by as much as this one purportedly was (105 ppm).

Also, to check the accuracy of your system, you need to use tools with known and better characteristics than your system. Using a "cheap stepper motor" (your words) to check repeatability (which is what you seem to be doing with it, though that's not entirely clear) does not seem to fit that bill.

Yes Dave, I'm using the stepper motor to check repeatability. As for your comment about "you need to use tools with known and better characteristics than your system", I don't know what tools to use.

If you just want to know who won the race, timing accuracy does not matter. Repeatability does matter (given the required precision), and to establish that, you must have a highly repeatable process to measure. For light beam break sensors, people have used slotted disks, rotating at constant RPM.

If it is really important to know accurately to the millisecond how long some process takes, then to calibrate your equipment, you need some other, highly accurate and reliable method of measuring that time. And that method should able to measure time to much better than 1 millisecond precision.

jremington:
If you just want to know who won the race, timing accuracy does not matter. Repeatability does matter (given the required precision), and to establish that, you must have a highly repeatable process to measure. For light beam break sensors, people have used slotted disks, rotating at constant RPM.

To clarify the purpose of the project, precision is more important than accuracy because the goal of the project is for testing the race car, not really racing. Repeatability (high precision) is really the most important thing to me.

I'm thinking that the slotted disk rotating at a constant RPM is what I'm doing with the stepper motor. My measurements are not as precise as I want them. Leo suggested that my PhotoResistors are too slow for this project. Would you agree?

I'm doing with the stepper motor.

Stepper motors do not rotate at constant RPM. They start and stop, or slow down and speed up between steps, and steps are not even. Use a brushed DC motor, geared if need be.

Leo suggested that my PhotoResistors are too slow for this project. Would you agree?

Yes, far too slow.

Are you using the millisecond timer?
If so then it will never be accurate / repeatable to better than +/- 1mS.

Wawa:
No, I didn't.
Did you calculate how slow (for a sensor) a vane attached to a stepper moves through the beam.
Leo..

If the slow speed of a vane moving through the laser beam is a problem think how much bigger will be the problem when a soap-box-car moves through the beam.

Not to mention the problem when two 'box-cars break the beam at the same time.

There is also the non-trivial problem of synchronizing two separate Arduinos so that the times they record can be compared to each other with millisecond accuracy. Much simpler IMHO to have a single Arduino at the finish line and some means for it to detect the start instant - perhaps it could even trigger the start.

...R

jremington:
Stepper motors do not rotate at constant RPM. They start and stop, or slow down and speed up between steps, and steps are not even. Use a brushed DC motor, geared if need be.
Yes, far too slow.

I agree a DC motor is the way to go, a stepper will not be consistent. If the DC motor is driving blades then you should see how reproducibly you can measure the same blade/gap passing. You will need to watch that air movement does not affect the rotation speed.

Most important though there has been no answer to Grumpy_Mik's point;
Are you using the millisecond timer?
If so then it will never be accurate / repeatable to better than +/- 1mS.