Problem with parallel-connected stopwatches (getting mismatched readings)

Thread Starter

RaymondH

Joined Jun 30, 2017
6
Hi all,

The system shown is to time an athlete running a sprint. At the starting end, the runner releases the start button to create a 0.5 sec pulse to the reed relays to start the digital stopwatches.

When the runner breaks the light beam at the finish line, the photo sensor outputs a 0.5 sec pulse to stop the timing.

I'm using 3 relays / stopwatches just to verify accuracy, i.e. if all stopwatches agree, then I consider the system to be accurate.

PROBLEM: The stopwatches often don't agree -- The displays can be different by up to 0.04 seconds (40 ms).

=> I would like to know what could cause the different stopwatch indications?

Additional info:

1. At first I thought the problem was due to a transient current imbalance between the inputs to the 3 relays causing them to not operate the stopwatches at the same time, but this would cause a repeatable time difference affecting the same stopwatch(es), no? The time differences are (seemingly) random -- any of the stopwatches can be faster or slower, by zero to +/-0.04 seconds, than the other 2 stopwatches for any timing instance.

2. I can tell that the stopwatches do not start / stop at the same instant, based on mis-synchronized "beep" sound, so I doubt any problem with the stopwatches themselves. They all use the same basic chip and circuitry, which is accurate to about 3 sec per day which is much less than the time differences.

3. Response time of the reed relays is only 0.5 ms, also much less than the time differences, so the relays are probably not an issue either.

Any help appreciated!

Schematic.png
 

WBahn

Joined Mar 31, 2012
32,855
Your schematic doesn't make a lot of sense. You seem to be powering a 5 V regulator for half a second at the start and for half a second at the end. Then your symbol for the relay only shows the output of the regulator going to the relay contacts, but not the coil. What is powering the stopwatches when they are supposed to be running (since the regulator isn't powered during that time)?

It takes a certain amount of time for a regulator to come up and so you probably have a relatively slow ramp on the signal going to the reed switches. When the reed switches reach sufficient a threshold to energize is going to vary due to a number of things, including random noise.

Try powering the regulator continuously (when the power switch is closed) and then have all of your logic operate from the steady 5 V power.
 

Thread Starter

RaymondH

Joined Jun 30, 2017
6
Your schematic doesn't make a lot of sense. You seem to be powering a 5 V regulator for half a second at the start and for half a second at the end. Then your symbol for the relay only shows the output of the regulator going to the relay contacts, but not the coil. What is powering the stopwatches when they are supposed to be running (since the regulator isn't powered during that time)?

It takes a certain amount of time for a regulator to come up and so you probably have a relatively slow ramp on the signal going to the reed switches. When the reed switches reach sufficient a threshold to energize is going to vary due to a number of things, including random noise.

Try powering the regulator continuously (when the power switch is closed) and then have all of your logic operate from the steady 5 V power.

Yes, the 5V regulator is powered for just a half second for both starting and stopping. I did that to minimize battery consumption although the additional drain (5 mA) of the regulator being always powered won't be a big deal.

Sorry for the poor relay depiction. The regulator outputs to the relay coils, and the relay contacts short the start / stop button of the stopwatch.

The stopwatches are powered with internal batteries which I didn't show.

The relay / stopwatch current is low, so I thought the regulator would be at full 5 V within a few ms, but the ramp-up issue makes sense, so will try your suggestion, thanks.
 

WBahn

Joined Mar 31, 2012
32,855
I took a quick look at the datasheet for an LM7805 regulator and it doesn't show either specs or typical curves for how long it take the regulator to come up. That means that you can't count on any particular time.
 

crutschow

Joined Mar 14, 2008
38,520
I agree that momentarily powering the regulator is problematic.
Are there any filter capacitors at the input or output of the regulator?

If you are concerned about power, then use a low power regulator such as the LM2936 which has a quiescent current of just 15μA, so you can leave it powered all the time.

You will then need to add a transistor at the regulator output to energize the relays from the start button and end sensor.
 
A suggestion:

Replace the reed switches with FET Optocouplers or an OPTOMOS relay. You just need to find what is the highest resistor value (use a potentiometer) that reliably could "push" a button. It won't be needed afterwards. This is to chose what ON resistance you can tolerate and select based on that. Some OPTOMOS relays need as little as 1 mA to work.

You can remove the 5V relay and use a current regulator. The LM334 or the LT3092 https://www.google.com/url?sa=t&rct...LT3092&usg=AFQjCNFJ7mg1SlKE9r1oeqRSGZe_gNxYpQ

For each coil. The LM334 s good from 3 to 32 V, so depending on the LED voltage, you should be able to get good battery life too.
 

Thread Starter

RaymondH

Joined Jun 30, 2017
6
I took the regulator completely out of the circuit.... yet the timing errors still occur :confused: The only reason for the regulator was to safely use some 5V relays I had laying around, but since they're energized only a half second, I'll risk using signal voltage directly for now; can add dropping resistors later if any relays fry.

I tried a cap on the output (where the regulator was), then on each relay input, and each relay output, but no joy, same time variances.

I don't think noise would lead the 0.5 sec output, at least not consistently within 0.04 sec. None of the stopwatches has ever been triggered by anything except a deliberate start or beam break. The 0.5 second pulse was chosen to swamp any glitches caused by start button chatter or multiple beam breaks (e.g. if the runner's arm breaks the finish beam, unblocks it, then his torso breaks it again). The 0.5 sec pulse, being much longer than the 0.04 max difference, eliminates ringing effects.

This occurred to me -- a 2nd pulse (noise) to any stopwatch would stop it (if running), a 3rd pulse would re-start it, and so on. After hundreds of stop / start trials none of the stopwatches has ever stopped while the others kept running, or vice versa.... which implies that if noise is the culprit, only even-numbered (2nd, 4th etc...) spikes or oscillation cycles would cause a problem, and I don't see how that can be.

So I think the 0.5 sec pulses are clean. I suspect the reed relays, but will leave as is -- 0.04 sec max difference between stopwatches is only 0.02 max actual error for a given stopwatch, can live with that.

Thanks for the suggestions!
 
Last edited:

WBahn

Joined Mar 31, 2012
32,855
Putting capacitors on lines will slow the signal transitions down, which is not what you want.

Try using a Schmidt trigger comparator (not an opamp configured at a comparator).

The ideal thing to do would be too look at the signals with an oscilloscope and see if the signals at the stopwatch terminals really are varying by an amount you are seeing.

It is possible (don't know how likely) that the stopwatches you are using have intrinsic random variations in how quickly they respond to the input. Are these originally meant to be operated by a human? If so, human repeatability is probably sufficiently poor that the intrinsic repeatability (precision) of the response time of the watch wasn't a big design factor.

One possible way to test this is to use a single relay on all three stopwatches so that they are truly seeing the same signal. If the stopwatches are battery powered and this is the only point where their circuits come together, this is probably doable.
 

Thread Starter

RaymondH

Joined Jun 30, 2017
6
  • Yes caps would make things mushy, they were just diagnostic to see if any spikes existed.
  • Will consider a Schmidt, but I think the 0.5 sec pulses are clean / sharp and the problem is downstream of the node to the multi relays.
  • A scope would sure be handy, but don't have one :( and not worth renting for a non-critical 1-off project.
  • Interesting point re intrinsic (non)repeatability. The stopwatches are manually operated, and are the cheap sub-$10 dept store kind not intended for any kind of official timing. They are all different brands, and were purchased at different times so the batteries may also not be equi-voltage... but I discounted these physical differences due to the random variances not pointing to any particular unit, and the fact that all of them share the same functions and modes, suggesting the same chip and circuitry is used in all of them.
  • A single relay feeding all 3 stopwatches was the first configuration I tried (thinking the relays would be the biggest source of variance), but the loading / interaction between the stopwatches put responses all over the map, switching of one stopwatch would trigger the other etc -- perhaps some diodes could've helped, might tinker with that again.
 

BR-549

Joined Sep 22, 2013
4,931
Can you verify that all 3 have the same start up time?

Edit: Or maybe one clock and 3 indicators.
 
Last edited:

Thread Starter

RaymondH

Joined Jun 30, 2017
6
Can you verify that all 3 have the same start up time?

Edit: Or maybe one clock and 3 indicators.
If by "start up time" you mean the time for the stopwatches to respond to the relay (or after pressing the start / stop button), that I don't know. But any differences (intrinsic variation per above) should be revealed if I can reliably actuate the stopwatches on a common signal as was suggested.

I don't actually want 3 indicators, that was just to gain confidence that the system is accurate -- If all 3 stopwatches consistently matched then I'd presume it's accurate within the stopwatch specs (about 0.003%), and then just use one stopwatch.
 

Sensacell

Joined Jun 19, 2012
3,785
In the realm of cheap stopwatches, it would not surprise me if the internal MCU polls the input switch in a loop that takes 20 ms.
This would imply a random uncertainty of 40ms for all measurements, including start and stop uncertainty.

Your setup probably highlights this design compromise- that nobody else notices, or cares about.
 

BobTPH

Joined Jun 5, 2013
11,521
I suspect that each stopwatch has a free running clock used to debounce the switches. Since these will not be in sync, and each will start only at the next clock transition after the debounce period, they will have random differences in the start time and stop time even with exactly the same pulse coming in.

Bob
 

Thread Starter

RaymondH

Joined Jun 30, 2017
6
Yep, the time variations are intrinsic to the stopwatches, specifically the start / stop action (I trust clock accuracy is as advertised).

I compared 2 of the stopwatches on a DPDT slide switch and got the same random time variances and .04 max difference as in the built setup. The tested stopwatches were isolated on separate circuits, i.e. no interactive loading effects. I rapidly flipped the switch to minimize any difference due to mechanical differences -- I'm confident that the switch contacts close within a few ms of each other, but to account for any difference, I swapped the stopwatches and still got the same erratic variances and .04 max difference.

The time difference between stopwatches is also not dependent on the elapsed time, i.e. .04 is the max difference regardless whether the elapsed time is 5 seconds or 5 minutes, further supporting the notion that the variances are due to an overhead (polling / debouncing) function rather than clock accuracy.

Unfortunately the entire stopwatch circuit is a single potted chip, can't bypass said functions, so I'll settle with .02 max error, good enough for this app.

Bottom line, I should have verified the stopwatches as standalone units before building them into a circuit and then scratching my head (before pulling hair out).... so that's a lesson learned.

Thanks again for the insight and suggestions!
 

WBahn

Joined Mar 31, 2012
32,855
I suspect that each stopwatch has a free running clock used to debounce the switches. Since these will not be in sync, and each will start only at the next clock transition after the debounce period, they will have random differences in the start time and stop time even with exactly the same pulse coming in.

Bob
That may be the case, but I wouldn't be surprised if each button has a dedicated latch-based debounce circuit so as to avoid the power draw of a free-running clock since these were intended to run a year or two on a coin cell.
 
Top