Need pin functions and trigger signal access for Raspberry Pi camera b0266 to sync IMU

Hi everyone, I’m trying to sync two Raspberry Pi cameras with an MPU6050 IMU. I need access to the Sync Trigger signal on both cameras so I can align the camera frame timestamps with the IMU data. Has anyone done this? What pin actually gives the trigger signal?

Welcome to the forum. To point you in the right direction, can you share which camera model and platform you’re using? Also, have you checked the online documentation for the pinout? Some pins do output square-wave signals related to the frame rate, but I want to confirm which mod/board you have before digging in.

Platform is a Raspberry Pi 4, camera model b0266. I’m using the online documentation from uctronics. I was looking at the pin descriptions but they aren’t very clear to me. I probed some of the pins and I can see square signals that seem to match the frame rate, but I’m not sure which one is the actual sync trigger. I’ve attached a picture of the board/pins.

Thanks. When you say some pins show square signals, do you remember which pins those were or roughly what frequency you measured? Also, has this setup ever worked before, or is this the first time you’re trying the sync?

It actually worked before, but somehow it quit working. I don’t think I changed anything in the wiring. The square signals are still there on a couple of the pins, but the sync with the IMU data is off now. I can’t tell if the trigger signal itself stopped or if it’s something in my code.

Based on what you’re describing, the mod supports an external trigger mode, so accessing the trigger signal and synchronizing the frame with the MPU6050 is feasible. There’s no hardware limitation here. The tricky part is the code on your side — the external trigger handling needs to be programmed and debugged for your specific setup. Since it worked before, I’d first verify the trigger signal is still present on the same pin and that your code is still configuring external trigger mode correctly.

Okay, that helps. Is there any sample code or specific register/config for enabling the external trigger mode? I’d like to compare my code against something.

There isn’t a ready-made snippet we can provide for this, unfortunately. The supported path is to use the mod’s external trigger mode and write the synchronization logic yourself. In short: read the trigger signal on both cameras, use it to latch/align the frame timestamps, and compare against the MPU6050 data. Since the hardware supports external trigger mode, the rest is implementation and debugging on your end. I’d suggest going back to your last known-good config, re-checking the trigger pin output, and validating that external trigger mode is still enabled in your code.