# Hardware Synchronisation

> Syncing cameras and IMUs with a wire: hardware triggers and strobes, master and slave frame sync on camera sensors, genlock, exposure-midpoint alignment, what USB (UVC) cameras do and do not give you, camera–IMU hardware sync, PTP on GigE cameras, and GPS pulse-per-second.

Page: https://egocam.ai/sync/hardware-sync/

Hardware synchronisation means an electrical signal carries the timing. A pulse on a wire tells each camera when to start a frame, or a shared clock stamps every sample at the moment it is taken. It is the most accurate kind of sync, and the only kind that makes exposures truly simultaneous. Its cost is wiring, and cameras that expose the right pins.

This page assumes the vocabulary from [why synchronisation matters](https://egocam.ai/sync/why-sync-matters/): offset, drift, exposure midpoint, latency and jitter.

## Hardware trigger: primary and secondary cameras

A hardware trigger is a digital pulse on a camera's trigger input. In trigger mode, the camera does not free-run; it waits for the pulse and then captures a frame. Feed the same pulse to several cameras and they capture together.

Teledyne FLIR's application note [TAN2016008, Configuring Synchronized Capture](https://www.teledynevisionsolutions.com/globalassets/support/iis/application-notes/tan2016008-configuring-synchronized-capture.pdf) defines the goal: "Synchronized capture is when two or more cameras are capturing images at the same time (within microseconds of each other)." It describes two ways to make the pulse:

- **From one of the cameras.** "One method of doing this is when one "primary" camera is used to trigger one or more "secondary" cameras, using the primary camera's strobe." A strobe (or strobe output) is a camera output line that changes state when the camera exposes. The primary free-runs; the secondaries follow it.
- **From an external source.** "Any hardware trigger that provides a 3.3 V or 5 V square wave TTL signal can trigger the cameras." A microcontroller, a function generator or a dedicated sync board can all do this.

Older names for the same roles are master and slave. The details that trip people up are electrical and modal:

- **Output type.** On cameras with opto-isolated or open-drain outputs, the strobe needs a pull-up resistor to drive another camera's input. Such an output works like a switch to ground: it can pull the line low but cannot drive it high, so without a resistor to the supply voltage the line floats when the switch is off and the secondary sees no clean edge. The FLIR note gives values for specific models and warns that its wiring has "been tested with only one secondary camera".
- **Trigger overlap.** If a secondary camera cannot accept a new trigger while it is still reading out the last frame, it skips every other pulse. The FLIR note lists this failure: "Secondary camera captures images at half the frame rate of the primary camera", caused because "The secondary camera isn't using overlapping triggering".
- **Logic levels.** Inputs differ. The Raspberry Pi Global Shutter Camera's trigger input is "a 1.8 V input, so you might need a level shifter or potential divider" ([Raspberry Pi camera documentation](https://www.raspberrypi.com/documentation/accessories/camera.html#external-trigger)). Arducam's guide for its global-shutter modules on Jetson uses "a 3.3V trigger signal" and says "The trigger signal pulse duration will be fine from 1us ~ 1ms" ([Arducam external trigger application](https://docs.arducam.com/Nvidia-Jetson-Camera/Global-Shutter-Camera/external-trigger/)). Always check the board you have.

## Sensor-level frame sync: XVS, XHS and FSIN

Below the camera module, many image sensors have frame-timing pins of their own. The names vary: Raspberry Pi's documentation for its Sony-sensor cameras uses XVS (vertical sync) and XHS (horizontal sync), while Arducam calls the trigger input of its OmniVision OV9281 modules FSIN in one guide and XVS in another. What each pin does, and whether a module brings it out, is specific to the sensor and the board, so the only safe guide is the vendor's documentation. Here is what three vendors document.

| Camera | Pins | How it syncs | Source |
|---|---|---|---|
| Raspberry Pi High Quality Camera (Sony IMX477) | XVS | One camera, the "source", "can be configured to generate a pulse on its XVS (vertical sync) pin when a frame capture is initiated." Others, the "sinks", "can listen for this pulse, and capture a frame at the same time as the source camera." | [Raspberry Pi: synchronous captures](https://www.raspberrypi.com/documentation/accessories/camera.html#synchronous-captures) |
| Raspberry Pi Global Shutter Camera (Sony IMX296) | XTR (external trigger), or XVS and XHS | Recommended: pulse XTR on every camera. Alternative: wire XVS and XHS together, with a caveat: "The source records one extra frame before the sink starts recording." | [Raspberry Pi: synchronous mode (XVS)](https://www.raspberrypi.com/documentation/accessories/camera.html#synchronous-mode-xvs) |
| Arducam OV9281 modules | FSIN on its USB3 camera shield tutorial; XVS in its Jetson guide | "The FSIN pin of the OV9281 camera is used to trigger the signal input." The tutorial drives it from an Arduino with a 100 µs, 3.3 V pulse. | [Arducam: hardware trigger with external signal](https://docs.arducam.com/USB-Industrial-Camera/Connect-and-Sync-Multi-Stereo-Cameras/Hardware-Trigger-with-External-Signal/) |

Two practical notes from the Raspberry Pi documentation apply widely. First, a triggered camera's exposure is set by the pulse, so automatic exposure must be kept out of the way: "always specify a fixed shutter duration, to ensure the AGC doesn't try to adjust the camera's shutter speed." Second, sink cameras wait for pulses that may not come yet, so software timeouts need raising: "If the cameras don't all start within 1 second, the `rpicam` applications can time out" ([Raspberry Pi: wired synchronisation](https://www.raspberrypi.com/documentation/computers/camera_software.html#wired-synchronisation)).

Raspberry Pi also notes that for the HQ Camera, wired sync "is largely superseded by software camera synchronisation", which the [software sync page](https://egocam.ai/sync/software-and-visual-sync/#raspberry-pi-software-camera-synchronisation) covers.

## Genlock

To the best of our knowledge, the word genlock comes from broadcast video, where every camera locks its timing to a shared reference signal. In machine-vision and depth-camera documentation the word is used for a trigger that directly starts the sensor's exposure.

FRAMOS's guide for its D400e depth cameras, which are built on Intel RealSense D400 modules, makes the difference concrete by comparing two modes ([FRAMOS: external event camera synchronization](https://docs.framos.com/en/latest/D400e/ApplicationGuides/ExternalEventCameraSynchronization.html)):

| Mode | What the trigger does | Timing error |
|---|---|---|
| External Event | The camera keeps running "in continuous mode at the requested frame rate"; on a pulse it "sends the next frame generated to the host". | "This variable delay (frame jitter) will never exceed the 1 frame readout time." Up to 33.33 ms at 30 Hz. |
| Genlock | "the input trigger signal starts the exposure window on the image sensor". Only on global-shutter models. | A fixed delay from pulse to exposure, about 790–880 µs depending on resolution; depth and colour frames start about 170–260 µs apart. |

The lesson generalises. A *trigger* that only selects the next free-running frame is not exposure sync; it leaves up to a frame of jitter. Look for wording like "starts the exposure" in a camera's documentation. FRAMOS adds a caution about trusting the camera's own numbers: "Looking at the hardware timestamp values may not give correct information about this time difference, as they depend on the exposure value and some other factors."

## Exposure time and shutter sync

Shutter sync means the exposures happen together. A common trigger guarantees the exposures start together. That is only the same as "happen together" when every camera uses the same exposure time.

> **Diagram:** Two cameras triggered at the same instant but exposing for 1 ms and 10 ms. Their exposure midpoints, the instants the frames best represent, are 4.5 ms apart (top). Starting the longer exposure half its length earlier, as exposure-compensated triggering does, puts both midpoints at the same instant (bottom).

When exposure times differ, the frames' midpoints differ by half the difference in exposure (see the [worked example](https://egocam.ai/sync/why-sync-matters/#worked-example-cameras-with-different-exposure-times)). There are three ways to deal with it:

1. **Fix the exposure.** Use the same manual exposure on every camera. Simple, but it gives up auto-exposure.
2. **Timestamp the midpoint.** Record each frame's actual exposure start and length, and use the midpoint as its time. TUM-VIE's microcontroller "triggers the visual cameras, measures exposure start and stop timestamps and reads the IMU values", and the dataset defines "the timestamp of an image as mid-exposure point" ([Klenk et al., 2021](https://arxiv.org/abs/2108.07329)). This fixes the timestamps, not the exposures.
3. **Shift each trigger so the midpoints align.** This is VersaVIS's exposure compensation ([Tschopp et al., 2020](https://arxiv.org/abs/1912.02469)): "The idea is to trigger the camera for a periodic mid-exposure timestamp by starting exposure half the exposure time earlier to its mid-exposure timestamp". The board reads back each camera's exposure signal: "The exposure time return signal is used to time the current exposure time and calculate the offset to the mid-exposure timestamp of the next image." Against a 1 kHz LED timing board, the authors conclude "the time synchronization of two cameras has an accuracy better than" 0.5 ms.

VersaVIS also supports a master-slave stereo mode, where one camera's exposure signal triggers the other, so a stereo pair shares identical exposure timing.

## USB cameras and UVC

Most USB webcams and many small capture modules follow the USB Video Class (UVC) standard. UVC has timing fields, but they are easy to misunderstand.

### What UVC timestamps provide

The [UVC 1.5 specification](https://www.usb.org/document-library/video-class-v15-document-set) defines two optional fields in each payload header:

| Field | Definition in UVC 1.5 |
|---|---|
| PTS, Presentation Time Stamp | "the source clock time in native device clock units when the raw frame capture begins" |
| SCR, Source Clock Reference | A two-part value: a device clock sample, plus "a 1 KHz SOF counter, representing the frame number at the time the STC was sampled". "STC must be captured when the first video data of a video frame is put on the USB bus." |

The SCR exists so the host can relate the camera's clock to the USB bus clock, and through it to the computer's clock. The spec says these fields "allow the host software to reconstruct the source clock to support high-quality synchronization between separate data pipes (audio, video, etc.)". They are flagged per header ("D2: Presentation Time – This bit is set if the dwPresentationTime field is being sent as part of the header"), so a camera may not send them at all.

Even with a perfect PTS, it is the camera's own clock. Two UVC cameras each stamp frames on their own clock; UVC does not make them expose together.

### Host-side timestamping on Linux

On Linux, the `uvcvideo` driver stamps buffers with a host clock. The `V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC` flag means "The buffer timestamp has been taken from the CLOCK_MONOTONIC clock" ([V4L2 buffers](https://docs.kernel.org/userspace-api/media/v4l/buffer.html)). The driver can instead convert the camera's PTS through the SCR clock recovery; this is the module parameter `hwtimestamps`, described in the driver source as "Use hardware timestamps" and off unless set ([uvc_driver.c](https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c)). For the raw headers, the kernel offers a metadata format, `V4L2_META_FMT_UVC`, that delivers each payload header with a "system timestamp in host byte order, measured by the driver upon reception of the payload" and the USB frame number ([V4L2 UVC metadata](https://docs.kernel.org/userspace-api/media/v4l/metafmt-uvc.html)).

Host timestamps carry USB and operating-system jitter. VersaVIS measured its own serial-over-USB link: the clock residual "keeps oscillating at ±5 ms due to usb jitter", which its on-board filter smoothed to ±0.2 ms ([Tschopp et al., 2020](https://arxiv.org/abs/1912.02469)). The V4L2 documentation is candid about end-of-frame stamps too: "In practice, software generated timestamps will typically be read from the clock a small amount of time after the last pixel has been received".

### USB cameras with a trigger pin

UVC itself defines "hardware triggers", but for still capture, not frame sync: "One of the defined usages of the Status Interrupt Endpoint is for hardware triggers to notify host software to initiate still image capture. When the hardware detects a button press, for example, the Status Interrupt Endpoint will issue an interrupt". A camera button, in other words.

Frame-level sync on USB cameras comes from vendor hardware that brings a sensor trigger out to a pin, such as the Arducam USB3 shield with OV9281 modules above, or the opto-isolated input on the FRAMOS D400e. If a USB camera's datasheet does not document a trigger or sync input, assume it has none.

### Bandwidth and dropped frames

USB bandwidth is shared by everything on a controller. As arithmetic: an uncompressed 8-bit 1280 × 800 stream at 100 fps is 1280 × 800 × 8 × 100 = 819 Mbit/s, more than USB 2.0 high-speed's 480 Mbit/s signalling rate. At 640 × 400 it is 205 Mbit/s. When the bus cannot keep up, frames arrive incomplete or not at all.

Dropped frames break any sync scheme that counts frames. Linux's `uvcvideo` has a parameter for incomplete frames, "Don't drop incomplete frames" (`nodrop`), and V4L2 buffers carry a `sequence` number, "counting the frames (not fields!) in sequence", which lets software detect gaps. Raspberry Pi's software-sync notes say "at higher framerates or depending on system load, it is possible for frames, either on the clients or server, to be dropped", and suggest lowering the frame rate, adding buffers or reducing load. In RocSync's field recordings, the one failure in 73 recordings was caused not by the sync method "but rather to frame drops in the recordings from the Aria glasses" ([Meyer et al., 2025](https://arxiv.org/abs/2511.14948)). Check frame counters and timestamp gaps on every recording.

## IMU–camera hardware sync

The IMU needs the same treatment as a second camera. Kalibr's [camera–IMU guide](https://github.com/ethz-asl/kalibr/wiki/camera-imu-calibration) asks for "low jitter timestamps in same clock". Three hardware patterns are common.

| Pattern | How it works | Documented example |
|---|---|---|
| One controller triggers both | A microcontroller triggers the cameras and samples the IMU on its own clock. | VersaVIS triggers several cameras and reads an IMU over SPI, I2C or UART ([Tschopp et al., 2020](https://arxiv.org/abs/1912.02469)). |
| Controller triggers cameras, timestamps IMU interrupts | The IMU's data-ready interrupt pin is timestamped by the controller's clock. | Faizullin et al.: "This tool provides an electrical pulse right after every new IMU data sample is ready" ([Faizullin et al., 2021](https://arxiv.org/abs/2107.02625)). |
| Controller timestamps the camera's strobe | A camera free-runs; its exposure output is timestamped on the IMU's clock. | VersaVIS reads each camera's exposure return signal; TUM-VIE measures exposure start and stop via the trigger signal ([Klenk et al., 2021](https://arxiv.org/abs/2108.07329)). |

Hardware sync removes jitter, but constant delays inside the sensors remain and must be calibrated. TUM-VIE found a constant 4.77 ms IMU readout offset even with everything on one clock. VersaVIS found that the IMU's own filter moved the estimated camera–IMU offset from about 1.55 ms to 19.95 ms depending on its setting: "time offset is highly dependent on the imu filter configuration." The [IMU calibration guide](https://egocam.ai/calibration/imu-calibration/#calibrating-the-imu-to-the-cameras) covers estimating that offset with Kalibr.

## PTP (IEEE 1588) on GigE cameras

The Precision Time Protocol, IEEE 1588, synchronises clocks over Ethernet. Network cards and switches with PTP support timestamp packets in hardware, which removes most network jitter. Red Hat's documentation: "When used in conjunction with hardware support, PTP is capable of sub-microsecond accuracy, which is far better than is normally obtainable with NTP" ([RHEL 7: Configuring PTP using ptp4l](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ptp_using_ptp4l)).

GigE Vision cameras use PTP in two ways:

- **Common timestamps.** Every camera's timestamp counter is disciplined to a master clock. Basler's cameras support "IEEE 1588-2008, also known as PTP Version 2", and choose the master by "Priority 1" ([Basler: Precision Time Protocol](https://docs.baslerweb.com/precision-time-protocol)). Before capturing, check that the cameras have locked: on newer Basler models, "If the parameter value is Locked , the respective device should be sufficiently synchronized"; on others, watch the offset from master until it stays below your threshold.
- **Scheduled triggers.** GigE Vision 2.0 added scheduled action commands: each camera is told to act at a future PTP time, so network delay no longer matters.
- **Free-running exposure aligned to PTP time.** Sony's engineers describe cameras in free run starting each exposure at a time aligned with the grandmaster clock: "Although this is affected by the network environment, it is ideally possible for exposure synchronous control to be performed within 1μs" ([Vision Systems Design, 2017](https://www.vision-systems.com/articles/print/volume-22/issue-4/features/integration-insights-ieee1588-simplifies-camera-synchronization.html)).

PTP time is not wall-clock time unless the master follows a time source. Basler: "If no device in the network is synchronized to a coordinated world time (e.g., TAI or UTC), the network will operate in the arbitrary timescale mode (ARB)."

PTP suits fixed cameras around a capture space more than worn ones, since it needs Ethernet. The software side, `ptp4l` on Linux, is covered on the [software sync page](https://egocam.ai/sync/software-and-visual-sync/#ntp-chrony-and-ptp).

## GPS and pulse-per-second (PPS)

A GPS or other satellite-navigation receiver gives two time signals: serial messages with the time of day, and a pulse-per-second (PPS) output whose edge marks the start of each second. The chrony documentation explains the difference: the message-based time source "Typically, it is accurate to milliseconds. The other source is much more accurate. It is timestamping a pulse-per-second (PPS) signal" ([chrony FAQ](https://chrony-project.org/faq.html)).

PPS works as a hardware sync signal even without satellites. Faizullin et al. built an open-source board whose microcontroller imitates a GPS receiver, sending a PPS edge and a matching time message every second to lock a LiDAR's clock, while timestamping IMU interrupts on the same timer. They state "time synchronization accuracy is kept as best as 10 µs" ([Faizullin et al., 2021](https://arxiv.org/abs/2107.02625)). Repeating the pulse matters: syncing only once would let "time drift" add "an offset that grows over time".

Satellite time needs sky view, so it suits outdoor capture. Cameras that write GPS time into their files, such as GoPro's GPS timecode, are covered on the [software sync page](https://egocam.ai/sync/software-and-visual-sync/#gps-timecode).

## What it asks of the hardware

If a rig is being designed rather than assembled, most of these choices are fixed at the start:

- **Bring out the trigger.** Choose sensors and modules whose trigger or sync pins are documented, and route them to a connector.
- **One clock for the cameras and the IMU.** Timestamp exposures and IMU samples on the same counter, as close to the sensors as possible.
- **Stamp the exposure, not the arrival.** Record exposure start and length, so midpoints can be computed.
- **Count frames.** Keep a per-frame counter so dropped frames are detectable.
- **Keep sync running.** Repeat the sync signal during recording, so drift cannot accumulate.

## Sources

- Teledyne FLIR (2017). [TAN2016008: Configuring synchronized capture](https://www.teledynevisionsolutions.com/globalassets/support/iis/application-notes/tan2016008-configuring-synchronized-capture.pdf). Application note.
- Raspberry Pi. [Camera hardware documentation](https://www.raspberrypi.com/documentation/accessories/camera.html) ([synchronous captures](https://www.raspberrypi.com/documentation/accessories/camera.html#synchronous-captures), [Global Shutter external trigger](https://www.raspberrypi.com/documentation/accessories/camera.html#external-trigger), [synchronous mode (XVS)](https://www.raspberrypi.com/documentation/accessories/camera.html#synchronous-mode-xvs)) and [camera software: wired synchronisation](https://www.raspberrypi.com/documentation/computers/camera_software.html#wired-synchronisation).
- Arducam. [External trigger application (Jetson global shutter cameras)](https://docs.arducam.com/Nvidia-Jetson-Camera/Global-Shutter-Camera/external-trigger/) and [hardware trigger with external signal (USB camera shield)](https://docs.arducam.com/USB-Industrial-Camera/Connect-and-Sync-Multi-Stereo-Cameras/Hardware-Trigger-with-External-Signal/).
- FRAMOS. [External event camera synchronization (D400e)](https://docs.framos.com/en/latest/D400e/ApplicationGuides/ExternalEventCameraSynchronization.html).
- Klenk, S., Chui, J., Demmel, N. and Cremers, D. (2021). [TUM-VIE: The TUM stereo visual-inertial event dataset](https://arxiv.org/abs/2108.07329). *IEEE/RSJ IROS*.
- Tschopp, F. et al. (2020). [VersaVIS: An open versatile multi-camera visual-inertial sensor suite](https://arxiv.org/abs/1912.02469). *Sensors*.
- USB Implementers Forum. [USB Video Class 1.5 document set](https://www.usb.org/document-library/video-class-v15-document-set).
- Linux kernel documentation. [V4L2 buffers](https://docs.kernel.org/userspace-api/media/v4l/buffer.html) and [V4L2_META_FMT_UVC](https://docs.kernel.org/userspace-api/media/v4l/metafmt-uvc.html).
- Linux kernel source. [drivers/media/usb/uvc/uvc_driver.c](https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c).
- Raspberry Pi. [Software camera synchronisation](https://www.raspberrypi.com/documentation/computers/camera_software.html#software-camera-synchronisation).
- Meyer, J. et al. (2025). [RocSync: Millisecond-accurate temporal synchronization for heterogeneous camera systems](https://arxiv.org/abs/2511.14948). arXiv.
- Kalibr: [camera–IMU calibration](https://github.com/ethz-asl/kalibr/wiki/camera-imu-calibration), ETH Zurich ASL.
- Faizullin, M., Kornilova, A. and Ferrer, G. (2021). [Open-source LiDAR time synchronization system by mimicking GNSS-clock](https://arxiv.org/abs/2107.02625). arXiv.
- Red Hat. [RHEL 7 System Administrator's Guide: Configuring PTP using ptp4l](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ptp_using_ptp4l).
- Basler. [Precision Time Protocol](https://docs.baslerweb.com/precision-time-protocol).
- Eikawa, S. (2017). [Integration insights: IEEE1588 simplifies camera synchronization](https://www.vision-systems.com/articles/print/volume-22/issue-4/features/integration-insights-ieee1588-simplifies-camera-synchronization.html). Vision Systems Design.
- chrony. [Frequently asked questions](https://chrony-project.org/faq.html).
