🛠 Caméra MIPI CSI : brancher une Raspberry Pi Camera (OV5647/IMX219) sur la ZERO 3W

Radxa ZERO 3W · intermediaire · IMG-rz3w-intermediaire-5-rz3w-camera-mipi-csi-ov5647.svg — Radxa ZERO 3W avec le connecteur FPC 22 broches 0,5 mm (CSI 4 lanes) relié par une nappe à une Raspberry Pi Camera V2 (IMX219) ; zoom sur les broches I2C2_SCL/SDA_M1 du connecteur ; terminal v4l2-ctl --list-devices et image brute affichée dans VLC.

Objectives

One of the unusual strengths of the ZERO 3W: its MIPI CSI camera port (4 lanes, 22-pin 0.5 mm FPC connector) accepts Raspberry Pi Camera V1.3 (OV5647) and V2 (IMX219) modules — rare on a non-Raspberry board. You will correctly wire the ribbon cable, enable the sensor driver, and capture an image via V4L2. This is the building block for IP camera, NPU vision, and robotics projects listed in the project sheet (IPC car, KVM, etc.).

Hardware

Procedure

  1. With the board powered off, open the FPC connector latch, insert the ribbon cable with contacts facing the board (check orientation on the connector silkscreen), and close the latch. On Pi cameras, the ribbon is shorter on the lens side — use this as a reference.
  2. Enable the sensor overlay. Under Radxa OS, the rsetup tool (overlays menu) exposes device trees for supported sensors; for OV5647/IMX219, enable the corresponding overlay and then reboot.
sudo rsetup            # Menu > Overlay > caméra (ov5647 ou imx219)
sudo reboot
  1. After reboot, verify the sensor → pipeline chain:
dmesg | grep -iE 'ov5647|imx219|mipi|isp'      # le driver a-t-il répondu sur I2C2 ?
v4l2-ctl --list-devices                         # apparaît : /dev/video-csi ou rkcif
# Capture d'une frame :\nsudo apt install v4l-utils
v4l2-ctl -d /dev/video-csi --set-fmt-video=width=1920,height=1080,pixelformat=NV12 --stream-mmap --stream-count=1 --stream-to=frame.raw
# Ou via ffmpeg si présent (nom du périphérique selon l'image) :
ffmpeg -f v4l2 -video_size 1920x1080 -i /dev/video-csi -frames:v 1 frame.jpg
  1. The sensor is controlled via I2C (I2C2_SCL/SDA_M1 on the CSI connector): run i2cdetect -l, then the relevant bus should show the sensor address (0x10/0x36 typical for OV5647/IMX219).

Expected Verification

dmesg displays a successful sensor probe (ov5647 found / imx219 x:x); v4l2-ctl --list-devices lists a video pipeline linked to the CSI; a .raw frame is produced with a consistent size (1920×1080 NV12 ≈ 3.1 MB). A blurry image in the foreground is normal: these modules come focused at infinity from the factory, gently rotate the lens to adjust.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials