How long before sending sync signal based on crystal ppm

Thread Starter


Joined Feb 21, 2020
Here's my setup.

I have a custom built server (running on AT89LP52 microcontroller) and two clients.

On each client, theres a big microcontroller (AT89S52) connected in parallel to a smaller microcontroller (AT89C4051).

All micros have crystals attached to them and each crystal is rated to have +/-50ppm for frequency stability and +/-50ppm for frequency tolerance. they also have 33pF capacitors connected to each leg of the crystal but I may change the caps to 5% NPO (I probably have bad luck with 20% ceramics)

All devices connect to each other wirelessly with HM-TRP radio modules.

Now the smaller microcontrollers have phototransistors and lazers attached. Their job is to detect what remote client hits them and to know when it is their turn to start the lazer. Currently each client relies on the local microcontroller clock for timing.

In the initial stages, everything seems to run smoothly, but I'm afraid because of the properties of the crystals themselves that eventually the timing will go off (example: one micro could run several uS faster than the other) and the smaller microcontrollers will not respond with the correct data.

I am aware that a possible solution would be for the master to issue a sync command to all clients simultaneously, but the question is how frequent does this have to be done?

I do intend to replace the crystals in the smaller microcontrollers to ones with 10ppm tolerance instead of 50ppm tolerance for better accuracy, but even still, I will probably have to issue a global sync command for them as well.


Joined Jul 1, 2009
That's a question of drift- how long does it take for your circuit to break? resync in half that time. There are *lots* of possibilities, but without knowing more about your circuit, suggestions will be limited. Is the laser used for communications? If so, if you're creative and understand signaling, you might go that route.

Thread Starter


Joined Feb 21, 2020
For speed, the lazer does 2 to 3-bit communication per player so that the sensor can distinguish between a lazer shot and ambient light. The problem is trying to get all of the micros in sync.


Joined Oct 2, 2009
Murphy's Law will prevail. If something can go wrong, it will go wrong.

I think you need to take a different approach to your problem.
The problem is not a 50ppm crystal nor 5% NPO caps. The problem is how you are trying to implement your comm system.

Think of cell phones as an example. Billions of devices have to communicate with each other and their cellular towers. The system is tolerant to variation in frequency dependent components.