ARO234 - ext trigger a hoax?

I got the gpio thread1 part of ExternalTriggerExample.py running by removing unnecessary code from it and adding picam2 setup in it.

This revealed that the external 1.8Vdc trigger signal going to the camera in the while loop does absolutely nothing else for the picture taking but makes a delay in the thread1 gpio while loop !!!

You have also set RGB888 to None in the thread1 which causes the try: to fail giving only Failure messages.

I only get pictures by setting RGB888 = picam2.capture_array(“main”) but the problem here is that the picture is taken at the moment when the command itself is run and not when the 1.8Vdc trigger signal “triggers” the camera!

If what I now see here is right that means that it is not possible to define in a mechanical arrangement - which triggers the signal - the exact moment when the picture is taken (we have rising and falling edges depending on speed of machine).

We have made custom PCBs and mechanical systems for a rotating machine to use your camera to take pictures at a precise phase/moment of the machine. This is carried out with a rotating disk with an opening triggering an SX4070 sensor.

I really hope I am wron so, please tell me that I actually am wrong and the external signal will be used for the triggering and show me some working code for that.

I will start this thread in Raspberrypi forum too to see if other users have had better luck. If the external signal does not take the picture this feels like a hoax so I really really want to see that I am wrong.

@carro

I’m creating a simpler example of externally triggering a save graph, which I’ll annotate and add to our official documentation. It should be ready in a few days. Thank you for your patience.

I am waiting thank you.

It seems that there needs to be some kind of a continuous “keep alive” pulsing so that the camera driver does not time out? Please define what this is as we are using an external optical switch SX4070 in our machine and pulsing to camera will stop when the machine stops.

I’m trying to use an interrupt driven from the sensor to take pics but when the camera times out it needs a total power shutdown to restart it again. Is there a way to reset the driver without powering RPi off?

@carro

Try my newly written code, please note that you need to install a special version of libcamera to solve the timeout problem.
https://docs.arducam.com/Raspberry-Pi-Camera/Global-Shutter-Camera/external-trigger/#external-trigger-example