I'm have a shutter for a laser system that i'm controlling, and need to operate it in two modes. The shutter is opened by a ttl pulse and remains open for as long as the output is HIGH
The two modes
1.) ttl provided by external delay generator: in this case i'm just running the output of a delay generator to the shutter so that I can sync everything nicely and get very precise timing (but the amount of time the shutter is open is very short, tens of micro-seconds)
2.) "constant open mode": in this case I want to be able to keep the shutter open for long periods of time , with no concern over sync-ing with other parts of the system
Right now i'm achieving this with a toggle switch, flipping the ttl pulse between the delay generator and a constant voltage supply - however i would love to have a way to computer control this so i could interface it with other control software i have, for a more streamlined approach
If is just a TTL output the Arduino is 5V "TTL compatible". If it's an open-collector output, you'd have to add a transistor (with a base resistor) because the Arduino is driven high ("source current") and driven low ("sink current).
I'm not sure about the short output-pulses. There is always a delay while the processor instructions run and the program for it to "make a decision".
I don't understand exactly what you're trying to do, but - Is there a trigger input, or is everything totally under software control?
If there is an input, you'd probably have to use an interrupt to make sure you "catch" the trigger and to make sure the process STARTS NOW as soon as the input is triggered.
On the output, there may be some timing limits (minimum pulse width) and/or timing-resolution issues. Hopefully, somene else can help you with that.
Generally a TTL signal is an Open Collector output. Be sure the grounds are connected and connect the TTL to one of the Arduino pins programed as a input with the Pull Up on. If the TTL output is really TTL you will be ok. This appears to me to be a setup for a long exposure, if so the delay caused by the Arduino will not be noticable. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
The switch can be replaced by a SPDT reed-relay which is Arduino controlled. Then you don't have to worry about commoning grounds or power sequencing between parts of the system.
MarkT:
The switch can be replaced by a SPDT reed-relay which is Arduino controlled. Then you don't have to worry about commoning grounds or power sequencing between parts of the system.