Trying to reach 200fps at 400x400 12-bit on Pi Zero 2W Arducam Mira220

I’ve got a Mira220 on a Pi Zero 2 W and it just isn’t being recognized. I posted a question about this on Friday and added more details, but haven’t heard anything back — is this board usually responsive? At the moment I’m stuck at the driver install: I keep getting apt warnings when trying to install the pivariety driver and I honestly can’t tell what they mean.

Let’s work through it here. Can you paste the exact apt warnings/output you’re seeing, plus which OS image you’re running and how the Pi is connected to your network? A lot of these install failures come down to a package repo being unreachable, and the warnings are easy to misread.

Quick update — I sorted the install issue. Turns out my work firewall was blocking access to the repo needed for the pivariety driver, and I didn’t know how to read the apt warnings. Once I moved the Pi onto a phone mobile hotspot everything installed and the camera is now recognized.

Nice, the firewall/repo thing trips up a lot of people. Could you share your current environment as a baseline? libcamera version, where the camera registered, the unicam/ISP device nodes, and the pipeline config path.

Sure, here’s what I’m on:

  • Hardware: Pi 0 2 W, Arducam Pivariety, Mira220 sensor
  • libcamera v0.4.0+78-818d45eb-dirty (2025-02-14T02:03:07GMT)
  • Camera registered: /base/soc/i2c0mux/i2c@1/arducam_pivariety@c
  • Unicam device /dev/media3, ISP device /dev/media0
  • Pipeline config: /usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml
  • Host: CulverLab@SCOTPI1

I ran:

libcamera-hello -t 0

It reports an error but appears to acquire images fine:

[0:01:58.331072920] [1807] INFO Camera camera_manager.cpp:327 libcamera v0.4.0+78-818d45eb-dirty (2025-02-14T02:03:07GMT)
[0:01:58.543972237] [1810] ERROR IPAProxy ipa_proxy.cpp:154 Configuration file ‘arducam-pivariety.json’ not found for IPA module ‘rpi/vc4’
[0:01:58.857793545] [1810] WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:01:58.861860812] [1810] INFO RPI vc4.cpp:455 Registered camera /base/soc/i2c0mux/i2c@1/arducam_pivariety@c to Unicam device /dev/media3 and ISP device /dev/media0
[0:01:58.862036699] [1810] INFO RPI pipeline_base.cpp:1160 Using configuration file ‘/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml’
Made X/EGL preview window
Mode selection for 800:700:12:P
SRGGB12_CSI2P,640x480/0 - Score: 831.429
SRGGB12_CSI2P,2147485248x1400/0 - Score: 1.11209e+09
Stream configuration adjusted
[0:02:04.086076621] [1807] INFO Camera camera.cpp:1202 configuring streams: (0) 800x700-YUV420 (1) 640x480-SRGGB12_CSI2P
[0:02:04.152849451] [1810] INFO RPI vc4.cpp:630 Sensor: /base/soc/i2c0mux/i2c@1/arducam_pivariety@c - Selected sensor format: 640x480-SRGGB12_1X12 - Selected unicam format: 640x480-pRCC

Good, that means the sensor is up and streaming. The ‘arducam-pivariety.json not found for IPA module rpi/vc4’ error is a known harmless one — you can ignore it, it doesn’t affect capture (RPi3 and IMX462 on Bookworm - #23 by Dion). So what’s the capture target you’re trying to hit?

The end goal is a Speckle Contrast Optical Tomography (SCOT) system for medical imaging — essentially a miniaturized optical neuroimaging setup. Requirements are 12-bit, 400x400, ~200fps, mono, over MIPI CSI with picamera2, on a Raspberry Pi for the prototype (FPGA/MicroChip A7 for production). I need roughly 32 cameras for the initial prototype. I’m stalled because I can’t get the 200fps frame rate — I figure I can reduce the ROI if MIPI transfer is the limit, e.g. 12-bit 200fps @ 400x400. Is there documentation on increasing frame rate / reducing the ROI?

Reducing the ROI is the right approach. Can you share your config.txt so I can see the current setup? And let me know which port/camera index you’re using.

Here’s my configuration.txt and a screenshot of the capture (attached). libcamera-hello runs and previews images despite that IPA config error I mentioned earlier.

Thanks. I’ve added a note to the Arducam AMS-OSRAM docs page covering this: AMS OSRAM Cameras - Arducam Wiki

Update: external triggering is now working on the Pi5, but I’m still stalled until I can get the frame rate up to 200Hz. Also, I found a documentation error — with the Mira220 plugged into the Cam1 MIPI port on a Pi5, the trigger has to be set on subdev2, not subdev0 like the docs say.

Good catch — you’re right. For a Pi5 with the Mira220 on the Cam1 MIPI port, the trigger node is subdev2, so it’s:

v4l2-ctl -d /dev/v4l-subdev2 -c trigger_mode=1

I’ll get that corrected on the AMS-OSRAM page under External Trigger.

So to sum up where we are: the original install failure was your work firewall blocking the pivariety repo (the apt warnings were the symptom of that), and the libcamera-hello IPA json error can be ignored. For the frame rate target, reducing the ROI is the way forward — 12-bit 200fps @ 400x400 should be workable if MIPI transfer is the limiting factor, and the ROI tuning steps are on the docs page. External trigger on the Pi5/Cam1 port uses subdev2.