14
« on: March 15, 2021, 08:26:34 AM »
For my tests with cameras and external triggers I tried a function generator and an Arduino.
tl;dr: it was easier with the Arduino
I have a two channel function generator (Rigol DG1032Z to be precise). I configured it in a way, that on channel 1 I get a 5V trigger with my desired framerate, e.g. 1000 Hz.
Then I configured channel 2 in the same way. Then I set channel 2 in a way, that the triggers from channel 2 are exactly inbetween the triggers from channel one.
(Google "phase difference" for more info) Some function generators specify this in degrees, so a 180 degree phase difference means that channel 1 is shifted half the frequency.
This did work. Out of my two channels came alternating triggers.
And now the "BUT":
When I wanted to change the frame rate, I had to configure the second channel again and completely new. I tried all settings (locking the channels to each other,...) and read the manual, but changing the frequency (which means framerate) always made the settings from the 2nd channel messed up. I configured the generator with the buttons on the device. You can also do this via an USB connection, but then I used an Arduino.
And there - within 5 minutes I had 2 pins alternating the triggers with ease. It is basically just some delays and pulling the pins up and down.
I did this "manually" by changing the delay times in the source code and it worked good enough for my basic tests. I wanted to test the beam splitter after all.
One could modify the Arduino sketch maybe even with a display to create a changeable frequency with a rotary enoder as an input. But this was too much effort since I had a running solution for my tests.
I hope I explained everything in an understandable way.
Tell us when you ever try it, lwaters, I'm interested in your solution.