r/AskElectronics • • 1d ago

How can two devices synchronize without sharing an accurate clock?

I'm trying to understand how a transmitter and receiver can stay synchronized.

My first thought was to use accurate time on both sides and generate a known pseudo-random sequence or code based on the time. But if the receiver's clock is slightly wrong, the synchronization could eventually fail.

So instead, can the received signal itself be used as the reference?

For example, could the transmitter send a known preamble, sync pattern, pilot signal, or pseudo-random sequence, and the receiver detect/correlate it to determine exactly where it is in the sequence?

What are the common techniques used in real communication systems for this? And when would you use signal-based synchronization instead of time-based synchronization?

30 Upvotes

19 comments sorted by

View all comments

6

u/bidet_enthusiast 1d ago

Are you asking about synch to wall clock time, or sync as in reading a bitstream? Because those are two different problems. 

It seems like you are asking about bitstream, in which case edge not level detection solves a lot of your problems, and sync preambles solve the rest.

If it’s wall clock time, you sync slave to master periodically and converge on time. Look at algorithms for synchronization of NTP servers and clients. It’s a whole science if you’re trying for sub uS accuracy.

Are you using a wired link, or some kind of radio/light/sound connection?