sync camera timing precisely XVS test points on multiple rPi's

Raspberry Pi cameras (V1, V2, wide angle etc), HDMI capture modules etc.
Post Reply
Posts: 8
Joined: Thu Feb 25, 2021 4:44 pm

sync camera timing precisely XVS test points on multiple rPi's

Post by 3DStereoPhoto »

tldr; should I tie the cameras XVS test points together so the multiple cameras take a picture at the exact same time?

What I want to do: use 3 stereo Pi's and 6 HQ cameras to take still pictures, with the same settings at exactly the same time. I am mostly interested in still photos at full resolution, but if it would work for video too, that would be amazing.

Questions: Is it worth using the XVS test points for triggering? How can I get the cameras to use the same settings across stereoPi's? (like iso(gain?), exposure, aperature, framerate?)

my plan: 1) start with one stereo pie and get hardware working, solder a wire to connect the XVS test points on each camera together.
2) try to config the sync on the two cameras
3) setup a second stereo pi with two cameras BOTH as trigger sinks and connect all XVS test points of the 4 cameras together.
4) tie grounds of two stereo Pi's together( will actually power them all from same source and ground)
5) tie picture trigger button of the two stereo Pi's together.
6) try to push the iso, aperature, exposure, framerate, other settings, from the master stereo pi to the other one.( best way? maybe a UART connection to the two stereo-pi's? not sure) sort of like a half-press on a DSLR but push settings to other rPi's.
7) basically repeat the setup for the 3rd stereo pi. seems like if I can get two working it will be the same process for any additional ones.

Thank you for any advice and help!

per this post you can make one camera a trigger source and the others trigger sinks:

I did read most of the thread but didn't fully understand it.... I hope enough will make sense when I get started.

_------------- some text from post below
Trigger Mode Sync
It is possible to synchronise the readouts of two or more imx477 sensors by wiring their XVS test points together. These devices can be on separate Pi boards, or can be on a Compute Module (CM) board with two sensors attached.

One camera must act as a trigger source, and the others act as trigger sinks. To set this up, the following parameter must be set in config.txt:

# Set to 0 to disable.
# Set to 1 to act as a trigger source device on a non-CM board.
# Set to 2 to act as a trigger sync device on a non-CM board.
# For a CM board, use imx477_trigger_mode:0=1 to set camera 0 as trigger source, or imx477_trigger_mode:0=2 to set camera 0 as trigger sync.
# Similarly, use imx477_trigger_mode:1=1 to set camera 1 as trigger source, or imx477_trigger_mode:1=2 to set camera 1 as trigger sync.

User avatar
Site Admin
Posts: 852
Joined: Tue Apr 16, 2019 9:23 am

Re: sync camera timing precisely XVS test points on multiple rPi's

Post by Realizator »

Hi 3DStereoPhoto,
At first, you found the key topic on Raspberry Forum for HQ cameras sync. :-)
1. Choose the camera you are planning to use as a Master. If you choose CAM0 - this connector is near the USB C port. CAM1 connector is closer to micro SD card slot. Both camera connectors have a name near them on the PCB.
2. If you choose CAM0 as a master and CAM1 as a slave, you should add these rows to the config.txt file on your "main" StereoPi:
# Set CAM0 as a trigger source:
# Set CAM1 as a trigger sync:

To clarify:
- we have two cameras with names 0 and 1 (i.e. CAM0 and CAM1)
- each camera can be either a sync source (mode 1) or the sync slave (mode 2).
With this config file, your CAM0 acts as a master, and CAM1 as a "listener" to sync with the master.

3. If you want to add more StereoPi, all their cameras should be "slave" to listen to the main "Master". I.e., you should put these lines to your "slave" StereoPi boards:
# Set CAM0 as trigger sync:
# Set CAM1 as trigger sync:

Both cameras at your secondary StereoPi will listen for the XVS signal from the CAM0 of the 1st StereoPi.

Please be careful with grounding. Also, I remember that StereoPis (or Raspberry Pis) should be powered on within minimal time (like a few seconds). Otherwise, the sync might not work correctly. The power sequence for the cameras might matter too.
Eugene a.k.a. Realizator

Posts: 8
Joined: Thu Feb 25, 2021 4:44 pm

Re: sync camera timing precisely XVS test points on multiple rPi's

Post by 3DStereoPhoto »

thank you so much for the reply and confirmation on the timing synchronization for the camera and how to do the config files.

I am planning to get the hardware put together this weekend the V2 is such an awesome upgrade, I appreciate the work that went into it.

Post Reply