Issue with triggering D435 with external trigger
Hello,
I have a Realsense a few D435if and would like to trigger them with a trigger generated by an external device.
I made connecting cables following the description in https://dev.intelrealsense.com/docs/multiple-depth-cameras-configuration and I am able to synchronize a master D435 to a slave D435 (confirmed by enabling the laser emitter in one device and being able to see it in the other even at short exposure times).
However, if I generate a trigger signal using a wave generator of an oscilloscope, the image preview in RealsenseViewer starts flickering for all devices set to slave mode (inter cam sync mode = 2). Devices set to default mode (inter cam sync mode = 0) do not react. In this test, there are no devices set to master mode. The error log often shows messages like "uvc-sensor.cpp:163 - Frame counter reset" and "notification.cpp:22 - Right MIPI error", but I think not always.
With that external trigger active, I don't get any output from the devices from a custom software component. Immediately when switching off the external trigger, flickering stops in RealsenseViewer, and data can be captured with custom software.
The generated signal is a 30 Hz rectangle pulse with +1.8V high and 0V low value, I tried widths of 50 microseconds (observed from the D435 in master mode) and 100 microseconds (found in https://dev.intelrealsense.com/docs/multiple-depth-cameras-configuration )
The effect is the same with and without the capacitor and resistor proposed for ESD protection of the passive circuit in https://dev.intelrealsense.com/docs/multiple-depth-cameras-configuration
I do see some overshoot/ringing in the generated signal with the D435s connected. When reducing this with a snubber circuit of a small resistor and capacitor between signal and ground at the signal source without change.
Do you have an idea what might be wrong?
-
Hi Johannes Rabe I have not seen a previous case of image flickering when using hardware sync with an external trigger pulse.
You seem to be doing everything right in regard to your cabling, settings and the width of the trigger pulse (50 when using a master camera, 100 or more when using an external trigger).
The frame counter error can indicate that an ESD charge is building up in the sync cable and then being discharged. This can occur with sync cables that are longer than 3 ft, which is why anti-ESD components are recommended for long cables. You have already tried these components though, and since the problem does not occur when using a master camera trigger, it suggests that the sync cabling is okay.
It can be very difficult to achieve sync when using an external trigger due to the need to sync the pulse frequency very closely with the slave camera's 'real' FPS (e.g 30.015 FPS). It is easier to implement external sync when using the genlock hardware sync mode. Whilst no longer supported by Intel, genlock sync modes (mode 4 and above) remain accessible in the SDK and Viewer.
You could test whether genlock is more stable than mode 2 for your project by setting the slave camera's mode to 4 and then setting the slave camera to 30 FPS and setting the frequency of the external trigger pulse to 15 Hz. Unlike mode 2, setting the trigger frequency to half the value of the slave camera FPS is required when using genlock sync modes. So if you wish to keep your trigger frequency at 30 when using mode 4, you would need to set the slave camera FPS to 60.
-
Hi MartyX Grover,
thank you very much for your response!
These are two very valuable points:
1) I tried to get to as close as possible to 30 Hz (which my scope self-measures at 30.000000169... Hz). When setting it to 30.015 Hz, it indeed works fine. I must have missed this.
2) The genlock sync mode: With setting mode 4, and the camera to 30 fps / trigger to 15 Hz, I am able to capture with 15 fps. Similarly for the 60 fps setting / 30 Hz signal.
So it looks like this solves my problem!
Due to the tests I did, my setup is currently not in the same state that I want to use in the final capture, so I'll need to put all the pieces together and see if it still behaves well :)
Please sign in to leave a comment.
Comments
5 comments