GPIO trigger using Arduino Leonardo
AnsweredHi,
Could I please get some advice for the following:
1) I am trying to use an Arduino Leonardo as a trigger for a BFS-PGE-13Y3M-C camera. I see from previous forum posts that I can either output a TTL pulse to Line 0, or short Line 2 and GND to trigger the camera.
- When using an Arduino pin to output the TTL pulse (5V), do I need a 1kohm resistor between the arduino pin and the Line 0 pin on the camera (as mentioned on pg.40 of the installation guide)?
- I tried testing the other trigger method of shorting Line 2 and GND on the SpinView GUI as shown below. I connected a momentary SW between Line 2 and GND and manually activated it, but I see no activity in the Log Viewer or the Line Status in the GUI. Is it supposed to update in real time such that the trigger should be somehow made known to the user?
-
Official comment
Hello Dominic,
It is not very clear if the issue is related to the camera, configuration or switch itself.
Please note, to trigger camera via opto-isolated Line0 would require to ground pin5 (blue color) and not pin6. Check if updating this configuration helps to resolve this issue.
Otherwise, one troubleshooting step is to test camera can be triggered without any external device:
- Enable trigger and set Trigger Source to Line2
- Start image acquisition
- Connect and disconnect Line2 (red colour) and pin6 (brown colour) at a second interval or less.
- You should observe camera grabbing frame during this process.
Please let me know if the provided information helps to resolve this issue.
Regards,
Ifeanyi
-
Hello Dominic,
With reference to the installation guide, we specified 1k ohm resistor for both opto isolated and non-isolated line using 5V external voltage.
Could you shed more light on what you mean by connecting "momentary SW between Line 2 and GND"? Does it work if Line2 is directly connected to Arduino TTL line and camera pin6 (brown color) to Arduino ground?
Regards,
Ifeanyi
0 -
Hi Ifeanyi,
Thank you for your reply.I currently have my Arduino connected to a 12VDC power supply, which is grounded to the same ground as the camera pin6. This is my code for the Arduino TTL output, which I trigger using a button:
//Write TTL pulseif (buttonState == HIGH) {// turn output on:digitalWrite(outputPin, HIGH);delayMicroseconds(12);digitalWrite(outputPin, LOW);delayMicroseconds(6);
When I press the button, I don't notice any change on the SpinView log, or the Line Status:
What should I expect to see? I understand that the Frame Start trigger selector is supposed to grab an image from the continuous acquisition.
For your question, previously I meant that I had also tried shorting Line 2 and GND as a trigger. I connected a button switch between Line 2 and GND, then pressed it to trigger - but I also didn't notice any feedback from SpinView to indicate that the trigger was receivedPlease let me know if you have any advice on the troubleshooting steps I should take
0 -
Hi Ifeanyi,
Thank you very much for the information, it was very helpful and has resolved my issue. Testing Line2 (red colour) to pin6 (brown colour) connection worked to grab the image.
For Line0, I hadn't wired the ground pin5 (blue color) for the opto-isolated input. I also changed the Rext to a 560ohm resistor for Line0 (TTL pulse is from Arduino Leonardo pin), and after these 2 changes managed to trigger the image grab.
Thanks again!0
Please sign in to leave a comment.
Comments
4 comments