Delay of a signal at specific time

Hi!
I don´t have much experience programming and would like to know how complicated
this would be to achieve.

I have a macro photography project I am working on and I am taking ALOT of pictures.
Because of the high number of pictures taken I am working with a electronic shutter since
a mechanical shutter would wear out pretty quick.
My problem is that when using a electronic shutter the camera does not output a flash sync
and this is what I want to achieve.

My solution is this
I have a trigger that automatically triggers the camera and the way that works is by short circuit two leads.
This is the same way a flash sync works but I need to be able to control the amount of delay.
Using the short circuit from the trigger I would like the arduino to delay the short for the flash by X ms.

How complicated would this be?
I don´t need to adjust the value once I find the right one if the shutter lag of the camera is constant.
This last part is something that I just need to find out since SONY have not been able to answer this.

Any help appriciated.

Best regards
Ricard

It should be extremely simple.

(What is "ALOT" an acronym for?)

Well I guess ALOT is my individual opinion but about 10k pictures/day. It is far more than I want to put the mechanical shutter through. Are there any examples of this being done or is there someone who can help me? :)

I'm sorry, but I still don't get what "ALOT" is. What do the letters stand for?

The code is likely to be fairly simple, though I doubt you'll find an exact example - wait for a change on the input, wait a certain amount of time, flip an output, wait another amount of time and flip the output again.

The IDE comes with plenty of examples - try working through a few.

ALOT : A Load Over Tenthousand.

it is a slang photography term.

Ah! I've not heard that one. Thanks.

this is not a functioning program, just part of one that could help. what it does, is looks to see when you press the shutter, then waits for 'x'ms and then trips the flash.

all timing is in ms, because you said so. you can get smaller slices if you need.

I would consider you pressing the button and having the program/arduino do both the shutter, timing and flash.

digitalRead(shutter_input);  read the shutter input

if(flag=LOW){   // this flag is to the sketh that the shutter_input was already seen
  if(shutter_input=HIGH){   //this looks to see if the shutter has has gone high
     flag = HIGH;
     then=millis();  // this is the heart of the timing.
}
}

if (millis-then=>duration){  // this looks at the time that the shutter was signaled and duration is your time in ms
  digitalWrite(flash,HIGH);   // this will flash the flash.
}

if (shutter_input=LOW); // shutter is not open, between photos.
  flag=LOW;   //re-sets the flag
  digitalWrite(flash,LOW);   //turns off the strobe.
}

AWOL: Ah! I've not heard that one. Thanks.

what it really means : ALOT : This spelling of "a lot" is frequent in informal writing but not generally accepted by arbiters of English usage. Others view it as a legitimate contraction.

if(flag=LOW){

Oops.

ALOT : This spelling of "a lot" is frequent in informal writing but not generally accepted by arbiters of English usage.

I thought that because it was capitalised, it was an acronym.

"alot" in English? No, I don't think so.

"allot" is a verb, but means to divide up.

Sorry forgot I was talking to code people but I had a good laugh reading the thread. I mean "a lot" of course as in "many of them". :D

Thanks for the code but as a noob I think I need more help if the code is not working as it is. :( Simple schematics would help too. (I have an Arduino Uno R3 that I could use) Pushing the button manually will be hard since the rest of the process is fully automated and take several hours.

Regards

AWOL: if(flag=LOW){

Oops. I thought that because it was capitalised, it was an acronym.

"alot" in English? No, I don't think so.

"allot" is a verb, but means to divide up.

he takes a lot of pictures. the correct use is 'a lot' I think he was shouting that he takes a LOT of pictures !!!!

Gadjimoj: Thanks for the code but as a noob I think I need more help if the code is not working as it is. :(

we need ALOT of information :) the Arduino can do ms quite easily. it can even do micro-seconds. you need to tell us if you press the button for the shutter, the shutter will change state. then some time after that, ALOT of micro-seconds later.... you want the flash to go off ? an output can be high, and then go low to make your flash, or it could be low and then go high to make your flash. all inputs and outputs are only a change of state. can be normally high or normally low. for that reason, it is a 50/50 that any of the cuff sketch will be wrong.

Does this unspecified Sony camera have a screen? Is the screen showing an image before the shutter is pressed? That would indicate that the screen is showing video at around 30 frames per second. I would bet that it doesn't interrupt the video in the middle of a frame to take a photo. It will wait for up to 1/30th of a second for the current frame to finish before it prepares the rest of the camera to take the photo. In photography terms, the shutter has to close (on video) before it can open (for the desired exposure.)

This creates a variable delay up to 1/30th which appears to be random to an external timer. There is no fixed delay which can be used to time the flash.

This may be why the camera doesn't produce a flash sync - it doesn't even know itself.

Very good input. @dave-in-nj, all cameras have shutter lag when triggered externally. My Sony a7s has is too but I have no idea how much and how consistent the lag is. Nikon is for example very consistent and Canon is not so making this solution with Canon will not work. I don't know about Sony but I guess I will find out. I also don't know how many ms but it will be trial and error and cross my fingers that the lag remains the same each time. About the high/low. All I know is that if I short circuit the two leads on the sync cable it produces a flash which is what I want the arduino to do with a delay from the trigger. (Trigger is split between the camera and arduino.)

@MorganS, interesting point. There is a live feed but I am not sure that it has to be the way you describe, might be though.

Anyway I an willing to try, spent an enormous amount of time on this already and this is worth trying.

Gadjimoj: Simple schematics would help too. (I have an Arduino Uno R3 that I could use)

Interfacing the existing automatic camera trigger to the Arduino and interfacing an Arduino output pin to the flash unit is more important than getting the code perfect at this stage.

You will be getting the Arduino to monitor the voltage of the trigger circuit so you need to know what the voltage is (including polarity) before the short is applied. If the voltage is small, it would be necessary to use an analogue input to the Arduino; if it is high you would need to reduce it with a voltage divider circuit. If it's negative you would need to generate somehow a signal suitable for an Arduino input. I suggest placing a fairly high value resistor in series with the Arduino input to prevent the trigger circuit trying to power up the Arduino when the Arduino is not powered.

I would recommend using a reed relay to fire the flash to give full isolation between Arduino and the flash unit. However a reed relay will have a delay of roughly 0.5ms and the contacts may bounce. An alternative is to connect electronically, such as via a transistor, but then you need to know more about the flash trigger circuit requirements.

I can't help wondering if it would be better to use a 556 dual timer integrated circuit instead of an Arduino: one timer to give the delay (adjustable by variable resistor) and the other timer to give the duration of the flash trigger.

I will try do do some readings on the trigger and sync cable this evening.

Archibald: I can't help wondering if it would be better to use a 556 dual timer integrated circuit instead of an Arduino: one timer to give the delay (adjustable by variable resistor) and the other timer to give the duration of the flash trigger.

555 would give only moderate flexibility in how you send the signal. it would require the same, or more hardware to close contacts or change the state of the resistor.

I would definitely not rule it out, they have been used ALOT ! and are a possible alternative.

Gadjimoj:
I will try do do some readings on the trigger and sync cable this evening.

what voltage is the trigger ?

do you know what voltage the flash needs to go off ?

dave-in-nj: what voltage is the trigger ?

do you know what voltage the flash needs to go off ?

We know from the original post that both camera and flash are triggered by short circuits. The Arduino needs to monitor the input to the camera to detect when it becomes a short circuit. When a short circuit is not applied, I guess the camera connection will have roughly +3V on it, but it's only a guess. If the flash is to be triggered via a semiconductor circuit, such as a transistor, it would be helpful to know the voltage, or at least its polarity, before a short is applied.

I did some reading using my multimeter just now.
The camera trigger is about 3.4V and 0V when triggered.
I did the same test on the flash sync cable and it was about 3.6-3.7V and
0V when the flash goes off.
I manually triggered the flash, could not come up with a better way.

Not sure what you mean by polarity.
The sync cable is a 3.5mm connector with a positive tip.