RobotGuide

Hardware & electrical · topic E19 · 20 hours

Camera interfaces & bandwidth

Anyone tuning cameras trips over bandwidth and cable length daily: an image comes out but frames drop, an image comes out but latency is huge, it breaks when you change the angle. None of these are «driver problems» — they are the interface's physical constraints.

Specialization stage · Intermediate
Algorithm · Hands-on System software · Aware Embedded & controls · Hands-on

Tools
Tools

What to learn

  • MIPI CSI-2: lane count and per-lane rate (D-PHY / C-PHY), differential pairs, flex-cable length limits (tens of centimeters)
  • GMSL2 / FPD-Link: coax or differential, PoC power over coax, a few meters to over ten meters, fixed latency (common in vehicles and robots)
  • USB cameras: UVC isochronous transfers consume bandwidth; resolution × frame rate × bit depth → bandwidth, and why compression is mandatory
  • Multiple cameras on one controller: shared bandwidth, timestamp chaos
  • Triggering and sync: hardware vs software triggers, a shared trigger source for multiple cameras, timestamp alignment
  • Be able to compute: how much bandwidth 4 × 2 MP @ 30 fps needs, and whether to pick CSI, GMSL, or USB
  • Latency breakdown: exposure + readout + transfer + decoding — which parts you can shave and which you cannot

The lesson · plain words

Camera interface selection is a pure multiplication problem: pixels × frame rate × bit depth × overhead = bandwidth, then pick against each interface's ceiling. Solve this problem cleanly, and the MIPI/USB3/GbE choice stops being guesswork.

The bandwidth formula and the blanking overhead

Bandwidth = horizontal pixels × vertical pixels × frame rate × bit depth × 1.25. That 1.25 is blanking: between every row and every frame the sensor needs «retrace» time, so the wire is not running at full payload. Drag the three sliders below and see which interface still fits your camera.

Examples: 1080p30 10-bit ≈ 1.55 Gbps — USB3 (4G) and MIPI 4-lane both work, GbE is out of the question. 4K30 10-bit ≈ 3.7 Gbps — USB3 is right at the limit; you must use MIPI 4-lane.

Interactive figure · drag it and see

What this figure shows: a bandwidth calculator with three sliders — resolution (MP), frame rate (fps), and bit depth (bit) — showing fps × bit ≈ Gbps and comparing the demand against four interface bars: USB3 (5Gbps), MIPI 2-lane 1.5G, MIPI 4-lane 2.5G, and GbE (1Gbps), each marked ✓ fits or ✗ not enough. Takeaway: bandwidth = pixels × fps × bit depth × 1.25 (blanking overhead) — compute the bandwidth first, pick the interface second.

Portraits of the three interfaces

MIPI CSI: direct to the SoC, lowest latency, does not occupy USB — but it exists only on-board (<20 cm), is hard to debug, and the protocol is closed. USB3 (UVC): plug-and-play, cross-platform — but it occupies USB bandwidth, adds frames of latency, and its connector loosens under vibration. GbE / GigE Vision: long distance (100 m), multiple cameras can share one network — but the lowest bandwidth and the largest latency.

Selection rule of thumb: the primary on-board sensor uses MIPI (performance first); prototypes and generality use USB3; multiple cameras at distance use GbE. Leaving all three interfaces available is part of domain-controller selection (E8).

MIPI's engineering reality

MIPI D-PHY has two variables: lane count (1/2/4) and per-lane rate (typically 1.5–2.5 Gbps); the camera module's lanes and rate must match the SoC's. Differential pairs need matched length and spacing (E12's routing iron rules), and the LC filters per spec.

Scarce debug tools are MIPI's pain point: problems usually appear at the «no image at all» stage. Triage order: power and clock (does the module's 24 MHz exist) → did I2C configuration registers go through → lane polarity / order correct → protocol layer last. A logic analyzer cannot capture high-speed lanes; you depend on SoC-side logs.

How deep to go

Compute bandwidth for any «resolution × frame rate × bit depth» and select the interface; explain why blanking eats 25%; know MIPI's four-step triage order. With these, you can own the interface layer of a camera subsystem.

Three questions — do you really get it?

1. The raw bandwidth of a 1080p30 10-bit camera is about?

  • A0.5 Gbps
  • B1.55 Gbps
  • C5 Gbps
Show answer

B. 1920×1080×30×10×1.25 ≈ 1.55 Gbps. Do not forget the ×1.25 blanking overhead.

2. Which camera interface has the lowest bandwidth but the longest reach?

  • AMIPI CSI
  • BGbE GigE Vision
  • CUSB3 UVC
Show answer

B. GbE has only ~1 Gbps of effective bandwidth, but 100 m reach and multi-camera networking are uniquely its own.

3. A MIPI camera produces no image at all — what do you check first?

  • ARecompile the kernel
  • BSwitch to a higher resolution
  • CPower and the 24 MHz clock, plus the I2C configuration channel
Show answer

C. The MIPI link depends on module power/clock and I2C register configuration; without those three, no image can exist.

Keep going deeper

Links without a marker stay on this site; the rest point to the Chinese edition until its translation batch lands.

How it fails in the field

  • Computing resolution but not bandwidth: frames drop the moment all four cameras turn on
  • Using software triggers for multi-camera sync: timestamps differ by tens of milliseconds, and fusion fails outright
  • Ignoring cable length limits: a MIPI flex stretched to 1 meter gives randomly corrupted images
  • Assuming compression is free: decode latency is often larger than the transfer itself

You have learned enough when

Given «4 × 2 MP, 30 fps, hardware sync required», you can compute the uncompressed bandwidth, pick an interface with justification, and identify the dominant latency sources and the optimizable ones.

The Chinese edition carries the full topic page for Camera interfaces & bandwidth, including the complete outline, depth requirements per career track, and further derivations: robotguide.dev/k/E19/.