Aligning several cameras and an inertial unit to one clock

Where the microseconds come from at each layer of a multi-camera rig, and how to tell an offset you can calibrate from jitter you cannot.

The budget in one table

Layer What it fixes Order of magnitude Where it is measured
0. Oscillator Two boards drifting apart on their own seconds per day Nothing measures it. It is the reason layer 1 exists
1. Clock domain What time it is, on every board tens of nanoseconds with PTP hardware stamps PTP offset log, or a scope on a pulse-per-second output
2. Local trigger When each sensor began exposing sub-microsecond on one board Two probes on the frame-start pins
3. Cross-board start When all the boards began microseconds, dominated by the spread of the start message A GPIO edge at each trigger against a shared time base
4. Frame matching Which frames belong together tens of microseconds The spread inside each recorded group, over a long run

Only the last row describes the dataset. The rows above it either cancel or convert into it, which is why a single quoted sync figure is impossible to evaluate.

Start with the crystal, not the code

Two boards that agree on the time at switch-on will not agree by the end of the day. The gap is set by the oscillator tolerance, and the arithmetic is simple enough to do before buying anything. A 50 parts per million part drifts 50 microseconds per second, which is 4.32 seconds over 24 hours. A 20 ppm part gives 1.73 seconds. Neither clock is wrong; they are just independent.

That number is the reason alignment has to be a repeating process rather than a setup step. Any scheme that aligns once and then trusts the result fails on the timescale of a recording session, and the failure is silent because each board's own timestamps stay perfectly ordered.

Layer 1: one clock domain

The first layer is the clock itself, and the choice of protocol decides what the other layers can achieve.

PTP, standardised as IEEE 1588, exchanges timestamps between a master and its slaves and corrects for the propagation delay between them. When the timestamps are taken in the network hardware rather than in software, the residual offset is in the tens of nanoseconds. The hardware part is not optional: a timestamp taken by the kernel after an interrupt has already absorbed the interrupt latency, and that latency is the thing being measured.

NTP reaches milliseconds, and on Wi-Fi it can be worse because the wireless link adds variable queueing. Wi-Fi TSF reads the access point's beacon counter and can do better than NTP, but it is bounded by beacon timing and by the driver's ability to read the counter at the right moment. Neither belongs in a budget that expects microseconds.

If a rig can be wired, wire it. A gigabit switch between the boards costs less than the cameras, and it removes the entire wireless error term from the budget before anything else is measured.

Layer 2: trigger the exposure, do not infer it

Knowing the time accurately is not the same as knowing when the sensor exposed. A camera with a rolling shutter starts each row at a different moment and reports only the start of the frame, and the moment that start happened is decided by a signal, not by the timestamp of the file that eventually contains the image.

The reliable pattern drives that signal. Most machine-vision sensors accept a frame-start input, often called FSYNC or FSIN, and the frame begins when the pin is asserted. A hardware timer generates that pulse, and every camera on the board is driven from the same timer, so they begin together to within the skew of the buffer that drives both pins. That is where half a microsecond comes from, and it is a property of the board rather than of the network.

The pattern to avoid is letting the sensor free-run and then stamping the frames on arrival. The timestamp then includes the image pipeline, the buffer queue and the scheduler, all of which vary with load, and the original moment is gone.

Layer 3: start across boards

Once each board has its own hardware trigger, the remaining problem is starting them at the same instant without putting the network in the timing path.

The pattern that works broadcasts the intended start time rather than a start command. The master sends a future timestamp, each board receives it, and each board arms its own timer to fire the local trigger when its clock reaches that value. Latency in delivering the message no longer matters, because the board is not waiting for the message to act, only to know when to act.

What does matter is the spread of that latency rather than its mean. A constant delay of ten microseconds is absorbed by the clock correction in layer one. A delay that varies from five to fifty microseconds becomes an alignment error, and it is invisible in a report that quotes only the average. Ask for the maximum over a session, and for the number of samples behind it.

Layer 4: match the frames

The last layer is grouping. Each stream carries a timestamp for its own start of frame, and the recorder collects the frames whose timestamps are closest, one from each camera, into a group. The spread within that group is what the dataset actually sees, and it is the only figure worth putting in a specification.

Everything above it either cancels or converts into this number. A clock offset of twenty nanoseconds and a start latency of ten microseconds both disappear if they are stable. The residual is the sum of whatever did not cancel, plus the quantisation of the grouping rule.

How to check each layer

Measurement, not documentation, is what makes these numbers real.

Failure modes worth knowing before they bite

What to ask a vendor

Official reading

IEEE 1588-2019 standard for a precision clock synchronization protocol

Linux PTP project documentation

Editorial guide. Sources reviewed on 2026-11-06; no hands-on testing.